#ifndef E_MATRIX_4X4_H
#define E_MATRIX_4X4_H

#include <DefineLibCommon.h>
#include <EVec4.h>
#include <EVec3.h>


struct  COMMON_DLL EMatrix4x4
{
    EMatrix4x4();
    virtual ~EMatrix4x4();

    double data[4][4];
    EMatrix4x4& operator=(const EMatrix4x4& value);

    void makeIdentity();
    void makeTranslate(double x, double y, double z);
    void makeTranslate(const EVec3& trans);
    
    void setTranslate(double x, double y, double z);
    void setTranslate(const EVec3& trans);

    void setRotate(const EVec4& quat);

    void makeScale(double x, double y, double z);
    void makeScale(const EVec3& scale);
    
    void makeRotate( double angle, double x, double y, double z );
    void makeRotate( double angle1, const EVec3& axis1,
            double angle2, const EVec3& axis2,
            double angle3, const EVec3& axis3);
    void makeRotate(const EVec4& quat);

    inline EVec3 getTrans() const { return EVec3(data[3][0], data[3][1], data[3][2]); }
    EVec4 getQuat();
    //get rotate as euler angle, default is x-y-z sequence
    EVec3 getEulerAngle();
};

#endif // E_MATRIX_4X4_H
